<#assign title="用户列表", users="layui-this">
<#include "header.ftl">
    <style>
    /*------公共样式开始------*/
    .layui-inline .layui-form-label {
        width: auto;
    }
    /*------公共样式结束------*/
    /*小屏幕设备*/
    @media (max-width: 767px) {
        /*------显示成果页面中部开始------*/
        /*------显示成果页面中部结束------*/
    }

    /*中大型屏幕设备*/
    @media (min-width: 768px) {
        /*------显示成果页面中部开始------*/
        /*------显示成果页面中部结束------*/
    }

</style>

    <div class="layui-body my-body">
        <div class="layui-card">
            <div class="layui-card-header">用户列表</div>
            <div class="layui-card-body">
                <#-- 搜索框 -->
                <div class="layui-form" lay-filter="users-form">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">用户名:</label>
                            <div class="layui-input-block">
                                <input type="text" name="name" placeholder="填写用户名" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">性别:</label>
                            <div class="layui-input-block">
                                <select name="sex">
                                    <option value="">全部</option>
                                    <option value="MAN">男</option>
                                    <option value="WOMAN">女</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">审核状态:</label>
                            <div class="layui-input-block">
                                <select name="register">
                                    <option value="">全部</option>
                                    <option value="NO_REGISTER">未审核</option>
                                    <option value="IS_REGISTER">已通过</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <button class="layui-btn" lay-submit lay-filter="search-users">搜索</button>
                        </div>
                        <div class="layui-inline">
                            <button class="layui-btn" lay-submit lay-filter="users-search">重置</button>
                        </div>

                    </div>
                </div>

                <hr class="layui-bg-orange">

                <#-- 数据表格 -->
                <table id="users-table" lay-filter="users-table"></table>
            </div>
        </div>
    </div>

    <#-- 列工具 -->
    <script type="text/html" id="users-bar">
        {{# if (d.admin != 'ADMIN') { }}
        {{# if (d.register == 'IS_REGISTER') { }}
        <button disabled class="layui-btn layui-btn-xs layui-btn-disabled" lay-event="register">
            <i class="layui-icon layui-icon-ok"></i>同意
        </button>
        <button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="notRegister">
            <i class="layui-icon layui-icon-close"></i>否决
        </button>
        {{# } else { }}
        <button class="layui-btn layui-btn-xs" lay-event="register">
            <i class="layui-icon layui-icon-ok"></i>同意
        </button>
        <button disabled class="layui-btn layui-btn-danger layui-btn-xs layui-btn-disabled" lay-event="notRegister">
            <i class="layui-icon layui-icon-close"></i>否决
        </button>
        {{# } }}
        <button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">
            <i class="layui-icon layui-icon-delete"></i>删除
        </button>
        {{# } else { }}
        <button disabled class="layui-btn layui-btn-danger layui-btn-xs layui-btn-disabled" lay-event="del">
            <i class="layui-icon layui-icon-delete"></i>删除
        </button>
        {{# } }}
    </script>

    <#-- 表格工具 -->
    <script type="text/html" id="users-toolbar">
        <button class="layui-btn layui-btn-sm" lay-event="delete">删除选中行</button>
        <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="pass">通过选中行</button>
        <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="notPass">否决选中行</button>
    </script>


    <script>
        layui.extend({
            users: '/js/users'
        }).use(['form', 'users', 'laypage', 'laytpl', 'laydate'], function () {
            var form = layui.form
                , laypage = layui.laypage
                , laytpl = layui.laytpl
                , $ = layui.$
                , laydate = layui.laydate;

        })
    </script>
<#include "footer.ftl">